add_subdirectory(unit_tests)

add_executable(pserver-lite
  main.cc
  pserver_service.cpp pserver_service.h
  commands.cc commands.h
  szcache.cpp szcache.h
  shm_connection.cc shm_connection.h
)

target_link_libraries(pserver-lite
  PRIVATE
    Szarp2
)

add_executable(szcache_test
  szcache.cpp szcache.h
  szcache_test.cpp
  shm_connection.cc shm_connection.h
)

target_link_libraries(szcache_test
  PRIVATE
    Szarp2
)

add_test(NAME szcache_test.test COMMAND szcache_test)

install(TARGETS pserver-lite
  RUNTIME DESTINATION "${INSTALL_BINDIR}" DESTINATION bin)
